It sends messages to the Telegram application. To use this feature, tokens must be generated using the Telegram Bot API.
Notes) Message length can be up to 4096 characters.
Telegram message functions are transmitted using up to 1000 message queues.
When sending a message, a delay of 2 seconds is applied for the same bot.
Therefore, when 1000 message queues are generated in a short time, the last message is sent about 33 minutes later.
int @TelegramMsg(string botToken, string chatID, string message)
Parameters
botToken : Assigned Telegram Bot Token
chatID : chat room ID
message : message to send
Return value
0, It does not return whether it is sent or not. Instead, if the transmission fails, the message window displays the error content.
Example 1)
@TelegramMsg("7300000000:AAGjg9MiJHEYvx2QbDjmISFISzDKZZZZZZZ", "-1000000000", $ST_0000);
Description: Send a string of ST_0000 string tags to the appropriate chat room.
Examples 2)
s = "Emergency Stop Alert";
@TelegramMsg("7300000000:AAGjg9MiJHEYvx2QbDjmISFISzDKZZZZZZZ", "-1000000000", s);
Description: Send the "Emergency Stop Alert" string to the appropriate chat room.
Note) How to use Telegram Bot
1. Sign up for Telegram
2. Send a /newbot command after searching the top of BotFather
2-1. Enter a
bot name
2-2. Enter bot nicknames (should end with bot)
2-3. Check
botToken
3. Create a new channel from the menu -> search for the bot nickname
and invite.eg. @Autobase_test_bot
4. Type the link below in the channel and
click the link to check the chat ID
https://api.telegram.org/bot[Enter the
bot token issued]/getUpdates
5. Use after entering telegram bot token and
chatId.
Version Information
Supported Version: 10.3.6.24 or higher
Related Helps)